<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Repetier-Firmware: src/ArduinoAVR/Repetier/motion.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="icon128.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Repetier-Firmware
   &#160;<span id="projectnumber">1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('motion_8cpp.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">motion.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="_repetier_8h_source.html">Repetier.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a7732f85c4fad1ba44371ecffef0933e7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="motion_8cpp.html#a7732f85c4fad1ba44371ecffef0933e7">minTime</a>&#160;&#160;&#160;45000L</td></tr>
<tr class="separator:a7732f85c4fad1ba44371ecffef0933e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:adc903858a94689ba9ae8882a135b3f3b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_h_a_l_8h.html#a5f255edd429b0abc92fae25c511d45a7">millis_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="motion_8cpp.html#adc903858a94689ba9ae8882a135b3f3b">previousMillisCmd</a> = 0</td></tr>
<tr class="separator:adc903858a94689ba9ae8882a135b3f3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab70f53b8c69009326cad4be6edd3a1f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_h_a_l_8h.html#a5f255edd429b0abc92fae25c511d45a7">millis_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="motion_8cpp.html#ab70f53b8c69009326cad4be6edd3a1f0">maxInactiveTime</a> = <a class="el" href="_configuration_8h.html#a93a47e8d3e037750926e3fbef221b909">MAX_INACTIVE_TIME</a> * 1000L</td></tr>
<tr class="separator:ab70f53b8c69009326cad4be6edd3a1f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfda5eefcb4f9723567641d4167a9582"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_h_a_l_8h.html#a5f255edd429b0abc92fae25c511d45a7">millis_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="motion_8cpp.html#acfda5eefcb4f9723567641d4167a9582">stepperInactiveTime</a> = <a class="el" href="_configuration_8h.html#a1ce1327259c993fa88540e00c8dd09b5">STEPPER_INACTIVE_TIME</a> * 1000L</td></tr>
<tr class="separator:acfda5eefcb4f9723567641d4167a9582"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a758f659f15b3784c13d14aee2e89e6a2"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="motion_8cpp.html#a758f659f15b3784c13d14aee2e89e6a2">baudrate</a> = <a class="el" href="_configuration_8h.html#a734bbab06e1a9fd2e5522db0221ff6e3">BAUDRATE</a></td></tr>
<tr class="memdesc:a758f659f15b3784c13d14aee2e89e6a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Communication speed rate.  <a href="#a758f659f15b3784c13d14aee2e89e6a2">More...</a><br /></td></tr>
<tr class="separator:a758f659f15b3784c13d14aee2e89e6a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af30ccb099aa74e5ab14e18d157294f1a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="motion_8cpp.html#af30ccb099aa74e5ab14e18d157294f1a">maxadv2</a> = 0</td></tr>
<tr class="separator:af30ccb099aa74e5ab14e18d157294f1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addae499e542db954fc7b0514113128ff"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="motion_8cpp.html#addae499e542db954fc7b0514113128ff">maxadvspeed</a> = 0</td></tr>
<tr class="separator:addae499e542db954fc7b0514113128ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa29b1c69052ae57a105fb4834214b491"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="motion_8cpp.html#aa29b1c69052ae57a105fb4834214b491">pwm_pos</a> [<a class="el" href="_repetier_8h.html#a6f04e4616ed807982151bfc71eacd600">NUM_PWM</a>]</td></tr>
<tr class="separator:aa29b1c69052ae57a105fb4834214b491"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9d0e229ec10a7a98c224f60d88fe410"><td class="memItemLeft" align="right" valign="top">volatile int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="motion_8cpp.html#aa9d0e229ec10a7a98c224f60d88fe410">waitRelax</a> = 0</td></tr>
<tr class="separator:aa9d0e229ec10a7a98c224f60d88fe410"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3da02840fd9fa28a75a7c2bfa234d72"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="motion_8cpp.html#ab3da02840fd9fa28a75a7c2bfa234d72">lastblk</a> = -1</td></tr>
<tr class="separator:ab3da02840fd9fa28a75a7c2bfa234d72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbb5b2f63985bdb1501b96085acbf741"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="motion_8cpp.html#afbb5b2f63985bdb1501b96085acbf741">cur_errupd</a></td></tr>
<tr class="separator:afbb5b2f63985bdb1501b96085acbf741"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a7732f85c4fad1ba44371ecffef0933e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7732f85c4fad1ba44371ecffef0933e7">&#9670;&nbsp;</a></span>minTime</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define minTime&#160;&#160;&#160;45000L</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a758f659f15b3784c13d14aee2e89e6a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a758f659f15b3784c13d14aee2e89e6a2">&#9670;&nbsp;</a></span>baudrate</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long baudrate = <a class="el" href="_configuration_8h.html#a734bbab06e1a9fd2e5522db0221ff6e3">BAUDRATE</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Communication speed rate. </p>

</div>
</div>
<a id="afbb5b2f63985bdb1501b96085acbf741"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afbb5b2f63985bdb1501b96085acbf741">&#9670;&nbsp;</a></span>cur_errupd</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t cur_errupd</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ab3da02840fd9fa28a75a7c2bfa234d72"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3da02840fd9fa28a75a7c2bfa234d72">&#9670;&nbsp;</a></span>lastblk</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int lastblk = -1</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Moves the stepper motors one step. If the last step is reached, the next movement is started. The function must be called from a timer loop. It returns the time for the next call. This is a modified version that implements a Bresenham 'multi-step' algorithm where the dominant Cartesian axis steps may be less than the changing dominant delta axis. Moves the stepper motors one step. If the last step is reached, the next movement is started. The function must be called from a timer loop. It returns the time for the next call.</p>
<p>Normal linear algorithm </p>

</div>
</div>
<a id="af30ccb099aa74e5ab14e18d157294f1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af30ccb099aa74e5ab14e18d157294f1a">&#9670;&nbsp;</a></span>maxadv2</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int maxadv2 = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="addae499e542db954fc7b0514113128ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#addae499e542db954fc7b0514113128ff">&#9670;&nbsp;</a></span>maxadvspeed</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float maxadvspeed = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ab70f53b8c69009326cad4be6edd3a1f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab70f53b8c69009326cad4be6edd3a1f0">&#9670;&nbsp;</a></span>maxInactiveTime</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_h_a_l_8h.html#a5f255edd429b0abc92fae25c511d45a7">millis_t</a> maxInactiveTime = <a class="el" href="_configuration_8h.html#a93a47e8d3e037750926e3fbef221b909">MAX_INACTIVE_TIME</a> * 1000L</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="adc903858a94689ba9ae8882a135b3f3b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc903858a94689ba9ae8882a135b3f3b">&#9670;&nbsp;</a></span>previousMillisCmd</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_h_a_l_8h.html#a5f255edd429b0abc92fae25c511d45a7">millis_t</a> previousMillisCmd = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aa29b1c69052ae57a105fb4834214b491"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa29b1c69052ae57a105fb4834214b491">&#9670;&nbsp;</a></span>pwm_pos</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t pwm_pos[<a class="el" href="_repetier_8h.html#a6f04e4616ed807982151bfc71eacd600">NUM_PWM</a>]</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="acfda5eefcb4f9723567641d4167a9582"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acfda5eefcb4f9723567641d4167a9582">&#9670;&nbsp;</a></span>stepperInactiveTime</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_h_a_l_8h.html#a5f255edd429b0abc92fae25c511d45a7">millis_t</a> stepperInactiveTime = <a class="el" href="_configuration_8h.html#a1ce1327259c993fa88540e00c8dd09b5">STEPPER_INACTIVE_TIME</a> * 1000L</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aa9d0e229ec10a7a98c224f60d88fe410"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa9d0e229ec10a7a98c224f60d88fe410">&#9670;&nbsp;</a></span>waitRelax</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile int waitRelax = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_cdf0096ae548159f0698b0a71289cf6c.html">ArduinoAVR</a></li><li class="navelem"><a class="el" href="dir_360d65efbdba454d299657bac363b72c.html">Repetier</a></li><li class="navelem"><a class="el" href="motion_8cpp.html">motion.cpp</a></li>
    <li class="footer">Generated on Tue Sep 19 2017 18:54:00 for Repetier-Firmware by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
